home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / fsync.z / fsync
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ffffssssyyyynnnncccc((((2222))))                                                              ffffssssyyyynnnncccc((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ffff_ssss_yyyy_nnnn_cccc, _ffff_dddd_aaaa_tttt_aaaa_ssss_yyyy_nnnn_cccc - synchronize a file's in-memory state with that on the
  10.      physical medium
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  14.  
  15.      iiiinnnntttt ffffssssyyyynnnncccc((((iiiinnnntttt ffffiiiillllddddeeeessss))));;;;
  16.      iiiinnnntttt ffffddddaaaattttaaaassssyyyynnnncccc((((iiiinnnntttt ffffiiiillllddddeeeessss))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _ffff_ssss_yyyy_nnnn_cccc moves all modified data and attributes of _f_i_l_d_e_s to a storage
  20.      device.  When _ffff_ssss_yyyy_nnnn_cccc returns, all in-memory modified copies of buffers
  21.      associated with _f_i_l_d_e_s have been written to the physical medium.  _ffff_ssss_yyyy_nnnn_cccc
  22.      is different from _ssss_yyyy_nnnn_cccc, which schedules disk I/O for all files but
  23.      returns before the I/O completes.
  24.  
  25.      _ffff_ssss_yyyy_nnnn_cccc should be used by programs that require that a file be in a known
  26.      state.  For example, a program that contains a simple transaction
  27.      facility might use _ffff_ssss_yyyy_nnnn_cccc to ensure that all changes to a file or files
  28.      caused by a given transaction were recorded on a storage medium.
  29.  
  30.      _ffff_dddd_aaaa_tttt_aaaa_ssss_yyyy_nnnn_cccc is the same as  _ffff_ssss_yyyy_nnnn_cccc, except that it only moves all the
  31.      modified data, and not the attributes of _f_i_l_d_e_s to a storage device.
  32.  
  33.      _ffff_ssss_yyyy_nnnn_cccc  and _ffff_dddd_aaaa_tttt_aaaa_ssss_yyyy_nnnn_cccc fail if one or more of the following are true:
  34.  
  35.      _EEEE_BBBB_AAAA_DDDD_FFFF          _f_i_l_d_e_s is not a valid file descriptor open for writing.
  36.  
  37.      _EEEE_NNNN_OOOO_LLLL_IIII_NNNN_KKKK        _f_i_l_d_e_s is on a remote machine and the link on that machine
  38.                     is no longer active.
  39.  
  40.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal was caught during execution of the system call.
  41.  
  42.      _EEEE_IIII_OOOO            An I/O error occurred while reading from or writing to the
  43.                     file system.
  44.  
  45.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _f_i_l_d_e_s is not a valid descriptor Synchronized I/O.
  46.  
  47. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  48.      Upon successful completion, a value of 0 is returned. Otherwise, a value
  49.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  50.  
  51. NNNNOOOOTTTTEEEESSSS
  52.      The way the data reach the physical medium depends on both implementation
  53.      and hardware.  _ffff_ssss_yyyy_nnnn_cccc returns when the device driver tells it that the
  54.      write has taken place.
  55.  
  56. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  57.      _ssss_yyyy_nnnn_cccc(2)
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.